<?php
class PrintAction extends SecurityAction {
	public $orderStatus = array (
			'0' => '取消订单',
			'1' => '已下单',
			'3' => '电子版文件错误',
			'7' => '等待印刷中',
			'10' => '已发货',
			'11' => '已完成' 
	);
	function code() {
		$ob = M ( "csl_print_code" );
		$ou = M ( "csl_user" );
		$map = array (
				'uid' => session ( 'info.uid' ) 
		);
		
		$info = $ou->where ( $map )->find ();
		
		list ( $page, $offset, $limit ) = HjCommon\Utility::Page ( $ob->where ( $map )->count () );
		
		$map1 = array (
				'csl_print_code.uid' => session ( 'info.uid' ) 
		);
		$list = $ob->join ( "left join csl_order on csl_print_code.order_no = csl_order.order_no" )->where ( $map1 )->limit ( $offset, $limit )->select ();
		
		$this->assign ( 'page', $page );
		$this->assign ( 'list', $list );
		$this->assign ( 'info', $info );
		$this->display ( 'Print/code' );
	}
}